<template>
	<view>
		<status-bar  title="提现记录" :back='1'></status-bar>
		<view class="viewbox auto  p-top20">
			
			<view class="list" v-for="(item,index) in pageData" :key="index">
				<view class="iconImg ">
					<image :src="$pop.staticImg('p3.png')" class="p3" 
					      v-if="item.cash_method == 1"></image> 
					 <image :src="$pop.staticImg('p1.png')" class="p1" 
					     v-if="item.cash_method == 4"></image> 
					<image :src="$pop.staticImg('p2.png')" class="p2"  
					     v-if="item.cash_method == 5"></image>
					
				</view>
				<view class="flex-1 height bot d-flex f-column j-centert examine"
				     :class="{'pass':item.state == 2,'turndown':item.state == 0}">
					<view class="row j-sb a-center">
						<view class="flex-1 ellipsis d-flex a-center">
							<text class="size30">提现 {{item.money}}</text>
							<text class="size26 m-left20" v-if="item.cash_method == 5">支付宝({{$pop.hidePhone(item.phone)}})</text>
							<text class="size26 m-left20" v-if="item.cash_method == 4">微信({{$pop.hidePhone(item.phone)}})</text>
							<text class="size26 m-left20" v-if="item.cash_method == 1">{{item.bankName}}({{item.bankCard.slice(-4)}})</text>
						</view>
						<text class="h6">{{item.state | stateTxt}}</text>
					</view>
					<text class="h6 m-top4">{{item.createTime}}</text>
				</view>
			</view>
			
			
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				pageData:[],
			}
		},
		onLoad() {
			this.withdrawalSubsidiary();
		},
		methods: {
			withdrawalSubsidiary(){
				this.$http.post({
					url:'/singleSaleApi/withdrawalSubsidiary',
				}).then(res=>{
					if(res.errcode != '100') return this.$Toast(res.msg);
					const result = res.data || [];
					this.pageData = result;
				})
			}
		},
		filters:{
			stateTxt(val){
				switch(val){
					case '1':
					   return '等待审核'
					    break;
					case '2':
					   return '提现成功'
					    break;
					case '3':
					   return '提现中'
					    break;
					case '0':
					   return '拒绝提现'
					    break;
				}
			}
		}
	}
</script>

<style>
	/* page{
		background-color: #f5f5f5;
	} */
</style>
<style lang="scss" scoped>
	.list{
		width:100%;
		height: 120rpx;
		display: flex;
		align-items: center;
	}
	.iconImg{
		width:100rpx;
		height: 100rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.p1{
		width:34rpx;
		height: 30rpx;
	}
	.p2{
		width:28rpx;
		height: 28rpx;
	}
	.p3{
		width:48rpx;
		height: 48rpx;
	}
	.examine{
		color:#006699;
	}
	.pass{
		color:#00a4a8 !important;
	}
	.turndown{
		color:#ff0000 !important;
	}
</style>
